home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 122
/
MOBICLIC 122.ISO
/
mac
/
DATA
/
DSS122
/
DSS122_01
/
DSS122_01.swf
/
scripts
/
frame_20
/
DoAction.as
Wrap
Text File
|
2010-02-11
|
3KB
|
111 lines
function closeZone()
{
_root["ZONE_" + gimme2digits(activeZone)].gotoAndStop("E1");
_root["ZONE_" + gimme2digits(activeZone)].swapDepths(_root["ZONE_" + gimme2digits(activeZone)].origDepth);
_root.LATEC.gotoAndStop("E1");
}
stop();
LETTRE_01._alpha = 0;
LETTRE_01.onRollOver = function()
{
if(_root.drag == undefined)
{
_root.FOND_01.LETTRE_01.gotoAndStop("E2");
joueBruitage({nomSon:"B_LETTRE"});
gereCursor(3);
}
};
LETTRE_01.onRollOut = function()
{
if(_root.drag == undefined)
{
_root.FOND_01.LETTRE_01.gotoAndStop("E1");
stopBruitage({nomSon:"B_LETTRE"});
gereCursor(1);
}
};
LETTRE_01.onPress = function()
{
if(_root.drag == undefined)
{
stopBruitage({nomSon:"B_LETTRE"});
gereCursor(1);
_root.drag = 2;
this.origX = this._x;
this.origY = this._y;
this.diffX = _root._xmouse - this._x;
this.diffY = _root._ymouse - this._y;
this.origDepth = this.getDepth();
this.swapDepths(40);
_root.FOND_01.LETTRE_01._alpha = 0;
this._alpha = 100;
this.gotoAndStop("E2");
}
};
LETTRE_01.onRelease = LETTRE_01.onReleaseOutside = function()
{
if(_root.drag == 2)
{
if(this.overSac == 1)
{
joueBruitage({nomSon:"B_SUCCES"});
this._visible = 0;
_global.HOTE.gListeLettres_DSS122[0] = 1;
}
else
{
joueBruitage({nomSon:"B_ECHEC"});
this._x = this.origX;
this._y = this.origY;
_root.FOND_01.LETTRE_01._alpha = 100;
this._alpha = 0;
}
_root.drag = undefined;
this.gotoAndStop("E1");
}
};
LETTRE_01.onEnterFrame = function()
{
if(_root.drag == 2)
{
this._x = _root._xmouse - this.diffX;
this._y = _root._ymouse - this.diffY;
if(_root.SAC.hitTest(_root._xmouse,_root._ymouse,1))
{
this.gotoAndStop("E1");
this.overSac = 1;
}
else
{
this.gotoAndStop("E2");
this.overSac = 0;
}
}
};
var i = 1;
while(i <= 5)
{
this["ZONE_" + gimme2digits(i)].pZone = i;
this["ZONE_" + gimme2digits(i)].onRollOver = function()
{
this.gotoAndStop("E2");
joueBruitage({nomSon:"B_" + gimme2digits(this.pZone)});
};
this["ZONE_" + gimme2digits(i)].onRollOut = function()
{
this.gotoAndStop("E1");
stopBruitage({nomSon:"B_" + gimme2digits(this.pZone)});
};
this["ZONE_" + gimme2digits(i)].onPress = function()
{
this.gotoAndStop("E3");
this.origDepth = this.getDepth;
this.swapDepths(20);
_root.activeZone = this.pZone;
stopBruitage({nomSon:"B_" + gimme2digits(this.pZone)});
joueSon({nomSon:"Z" + gimme2digits(this.pZone),actionFin:"closeZone"});
_root.LATEC.gotoAndStop("E2");
};
i++;
}